'''
Created on Mar 1, 2011

@author: Mario
'''
from igraph_module.Network import *;
from ProteinComparison import *;


(tmp_dir, tmp_fasta, tmp_result, gml_dir, first_gml, sec_gml) = parseConfigFile();
clustal_exe = parseClustalConfig();


file = gml_dir + first_gml;
first_fasta = first_gml.split('.')[0] + '.faa'
first_fasta = tmp_dir + first_fasta;
'''
print 'First fasta is ...' + first_fasta
n = Network(file);
k = 0.2
n_k = n.getKcoresGraph(k);
print tmp_dir + first_fasta
create_fasta(n_k, first_fasta)
'''


file = gml_dir + sec_gml;
second_fasta = sec_gml.split('.')[0] + '.faa';
second_fasta = tmp_dir + second_fasta;
'''
n = Network(file);
k = 0.2
n_k = n.getKcoresGraph(k);
print tmp_dir + second_fasta
create_fasta(n_k, second_fasta)
'''

evaluate_fastas(first_fasta, second_fasta, tmp_result, tmp_fasta, clustal_exe)
result = read_results(tmp_result);
